package com.kmist.xiakexing.tools;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

import androidx.annotation.Nullable;

public class DataBaseHelper extends SQLiteOpenHelper {
    public DataBaseHelper(@Nullable Context context) {
        super(context, Config.DATABASE_NAME, null, Config.DATABASE_VERSION);
    }

    @Override
    public void onCreate(SQLiteDatabase db) {
        String sql = "create table " + Config.TABLE_NAME_KEDIAN +
                "(_id integer, name varchar, zname varchar, maindesc varchar, no_fight integer, valid_startroom integer, no_sleep_room integer, " +
                "no_clean_up integer, item_desc varchar, objects varchar, exits varchar, coor varchar, notify varchar)";
        db.execSQL(sql);
    }

    @Override
    public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {

    }
}
